//
//  SFiltrateView.h
//  EasyRetail
//
//  Created by Samuel on 15/5/22.
//
//

#import <UIKit/UIKit.h>
@protocol SFiltrateViewDelegate;

@interface SFiltrateView : UIView<UITableViewDataSource,UITableViewDelegate>

@property (nonatomic,strong)UITableView *ftableViews;

@property (nonatomic,strong)UIViewController *getTargets;


@property (nonatomic, strong)NSObject<SFiltrateViewDelegate> *dataSource;
/**
 *  关闭当前cell
 *
 *  @param index
 */
- (void)closeCell;

@end

@protocol SFiltrateViewDelegate <NSObject>

@required
/**
 *  返回几个section
 *
 *  @param sFiltrateView
 *
 *  @return string section的title
 */
- (NSArray*)sectionOfSFiltrateView:(SFiltrateView *)sFiltrateView;
/**
 *  每个section里有几个cell
 *
 *  @param sFiltrateView
 *
 *  @return
 */
- (NSInteger)numberOfRowsInSectionOfSFiltrateView:(SFiltrateView *)sFiltrateView andSection:(NSInteger)index;
/**
 *  每个section里面index的内容
 *
 *  @param sFiltrateView
 *  @param index
 *
 *  @return
 */
- (UIView *)SFiltrateView:(SFiltrateView *)sFiltrateView viewForRowAtIndex:(NSInteger)index andSection:(NSInteger)sections;
/**
 *  每个的高度
 *
 *  @param sFiltrateView
 *  @param index
 *
 *  @return
 */
- (CGFloat)SFiltrateView:(SFiltrateView *)sFiltrateView heightForRowAtIndexPath:(NSInteger)index;

@optional
- (void)SFiltrateView:(SFiltrateView *)sFiltrateView didSelectRowAtIndexPath:(NSInteger)index;
- (void)SFiltrateView:(SFiltrateView *)sFiltrateView didSelectSection:(NSInteger)index;

@end